
import request from '../utils/request.js'

export function getMeetingMonthly(data) {
	return new Promise((resolve, reject) => {
		request.get("/ipad/meetingMonthly", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}
export function meetingMonthlyCorrelation(data) {
	return new Promise((resolve, reject) => {
		request.put("/ipad/meetingMonthlyCorrelation", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}

export function getMmeetingContrast(data) {
	return new Promise((resolve, reject) => {
		request.get("/ipad/meetingContrast", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}

export function meetingContrastCorrelation(data) {
	return new Promise((resolve, reject) => {
		request.put("/ipad/meetingContrastCorrelation", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}

export function getMeetingThreePoint(data) {
	return new Promise((resolve, reject) => {
		request.get("/ipad/meetingThreePoint", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}

export function meetingThreePointCorrelation(data) {
	return new Promise((resolve, reject) => {
		request.put("/ipad/meetingThreePointCorrelation", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}



export function getMeetingCompetitors(data) {
	return new Promise((resolve, reject) => {
		request.get("/ipad/meetingCompetitors", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}

export function meetingCompetitorsCorrelation(data) {
	return new Promise((resolve, reject) => {
		request.put("/ipad/meetingCompetitorsCorrelation", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}


export function getMeetingUnblended(data) {
	return new Promise((resolve, reject) => {
		request.get("/ipad/meetingUnblended", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}
export function meetingUnblendedCorrelation(data) {
	return new Promise((resolve, reject) => {
		request.put("/ipad/meetingUnblendedCorrelation", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}

/** 查询对比排序评吸对应的烟支信息列表 */
export function getContrastSortAPI(data) {
	return new Promise((resolve, reject) => {
		request.get("/ipad/meetingContrastSort", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}

/** 更新对比排序对应的烟支信息 */
export function updataContrastSortAPI(data) {
	return new Promise((resolve, reject) => {
		request.put("/ipad/meetingContrastSort", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}

/** 提交对比排序相关信息 */
export function submitContrastSortAPI(allId) {
	return new Promise((resolve, reject) => {
		request.put(`/ipad/meetingContrastSort/submit/${allId}`, {}).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}

/**获取顶部完成进度*/
export function getCompeleteList(data={}) {
	return new Promise((resolve, reject) => {
		request.get("/ipad/smokeMeeting/getWorkStatus", data).then((result) => {
			resolve(result);
		}).catch((error) => {
			reject(error);
		});
	});
}